<template>
	<view class="search-list">
		<!-- #ifdef MP-WEIXIN -->
		<view class="search-navbar">
			<view class="input-view">
				<uni-icons class="input-uni-icon" type="search" size="24" color="#999" />
				<input confirm-type="search" class="nav-bar-input" type="text" :placeholder="keyWord" />
			</view>
			<text @tap="search">筛选</text>
		</view>
		<!-- #endif -->
		<ShopList :keyWord=keyWord />
	</view>
</template>

<script>
	import ShopList from "@/components/ShopList/ShopList.vue"
	export default {
		data() {
			return {
				keyWord: ""
			};
		},
		onLoad(e) {
			this.keyWord = e.keyWord;
			// #ifdef APP-PLUS  
			let pages = getCurrentPages();
			let page = pages[pages.length - 1];
			let webView = page.$getAppWebview();
			webView.setTitleNViewSearchInputText(e.keyWord);
			// #endif
		},
		components: {
			ShopList
		}
	}
</script>

<style lang="scss" scoped>
	/* #ifdef MP-WEIXIN */
	.search-navbar{
		display: flex;
		align-items: center;
		justify-content: space-between;
		.input-view {
			display: flex;
			align-items: center;
			border-radius: 30rpx;
			width: 83%;
			height: 64rpx;
			margin: 10rpx 0;
			background-color: rgb(247, 247, 247);
			box-sizing: border-box;
			padding: 0 20rpx;
			margin-left: 20rpx;
			.nav-bar-input {
				margin-left: 20rpx;
			}
		}
		text{
			margin-right: 20rpx;
		}
	}
	
	/* #endif */
</style>
